<div class="popupTitle">
  <%
  Write(system.GetVar("title"));
  %>
</div>

<div class="CLASS01400">
  <table class="popupTableScript CLASS01401" cellpadding="0" cellspacing="0">
    <tr>
    <th class="TblHeaderUserConfig">${thChooseSystemLanguage}</th>
    <th class="TblHeaderUserConfig">${thChooseSystemLanguageNote}</th>
    </tr>
    
    <tr>
    
    <td class="CLASS01402" style='text-align: center; vertical-align:middle;'>
    <table style="margin:auto;">
    <tr><td style='text-align: center; vertical-align:middle;'><div>
      <select id="cbLang">
        <option value="de">${selectLangDE}</option>
        <option value="en">${selectLangUK}</option>
       </select></div></td>
       </tr>
       </table>
    </td>
    
    <td class="CLASS01403">

    <span class="CLASS01404">${hintSetSystemLanguageNoteRow1}</span><br/>
    <span class="CLASS01405">${hintSetSystemLanguageNoteRow2}</span>

    </td>

    </tr>

    <tr class="popupTableRow">
    <td class="CLASS01406" colspan="3">
      <table>
      <tr>
       <td width="10%" style='text-align: center; vertical-align:middle;'><div class="FooterButton CLASS01408" onclick="doSystemLanguageConfig();">${footerBtnOk}</div></td>
	   <td width="80%"></td>
       <td width="10%" style='text-align: center; vertical-align:middle;'><div class="FooterButton CLASS01408" onclick="cancelSystemLanguageConfig();">${footerBtnCancel}</div></td>
      </tr>
      </table>
    </td>
    </tr>
  </table>
</div>
<script type="text/javascript">
  var lang = homematic('CCU.getSystemLanguage');
  if(lang === 'de' || lang === 'en') {
    $('cbLang').value = lang;
  }
  doSystemLanguageConfig = function() {
    var selValue = $("cbLang")[$("cbLang").selectedIndex].value;
    homematic("CCU.setSystemLanguage", {'lang': selValue});
    PopupClose();
  };
  cancelSystemLanguageConfig = function() {
    PopupClose();
  };
</script>
